#!/usr/bin/env python

from fire import Fire
from PIL import Image


@Fire
def main(img_path):
    # Temporarily increase the decompression bomb limit to handle large images
    Image.MAX_IMAGE_PIXELS = 10000000000

    with Image.open(img_path) as img:
        width, height = img.size
        row = 1 + int(height / 1080)
        col = 1 + int(width / 1080)
        print(f"{row} {col}", end="")
        return
